/*
    板子硬件情况定义，统一提供给APP或者其他驱动的名称
    GPIO的相关设置、模式切换建议定义在这里
*/
#ifndef _BOARD_H_
#define _BOARD_H_

#include "mcu.h"

#define BSP_MCU_MODEL       POLSYS_MCU_PY32

#define BSP_TICK_CYCLE      10      // ms

#define LED                 ((gpio_pins_t *)&GPIOA->ODR)->pin1
#define Led_Init()		    Board_Init()//Gpio_Init()
#define Led_On()			Gpio_ClrPin(GPIOA, 1)//CLEAR_BIT(GPIOA->ODR, GPIO_ODR_OD1)//LED = 0
#define Led_Off()			Gpio_SetPin(GPIOA, 1)//SET_BIT(GPIOA->ODR, GPIO_ODR_OD1)//LED = 1
#define Led_IsOn()          (LED == 0)//(READ_BIT(GPIOA->ODR, GPIO_ODR_OD1) == 0)//


#define Board_GetTickCycleValue()   SYSTICK_VALUE
#define Board_GetTickNowValue()     (u32)(SYSTICK_VALUE - SysTick->VAL)



void Board_Init();

#endif

